﻿using Idte.Application.Core.Actor;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Idte.Application.Core.Project
{
    public class ProjectRole
    {
        [ForeignKey("ProjectId")]
        public Project Project { get; set; }
        [Key, Column(Order = 0), InverseProperty("ProjectId")]
        public Guid ProjectId { get; set; }

        [ForeignKey("UserId"), NotMapped]
        public ApplicationUser User { get; set; }
        [Key, Column(Order = 1), InverseProperty("Id")]
        public string UserId { get; set; }

        [ForeignKey("RoleId")]
        public AppRole Role { get; set; }
        [Key, Column(Order = 2)]
        public Guid RoleId { get; set; }
    }
}
